using System;
using System.Data.Services;
using System.Web;
using System.Collections.Generic;
using System.ServiceModel.Web;
using System.Linq;
using NorthwindEFModel;

namespace Common.Unity.Extensions.Entity.Testing.Services
{
	[System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)] 
    public class Northwind : DataService<NorthwindEntities>
    {
        // This method is called once during service initialization to allow
        // service-specific policies to be set
        public static void InitializeService(IDataServiceConfiguration config)
        {
            // TODO: set rules to indicate which entity sets and service operations are
            // visible, updatable, etc.
            // (for testing purposes use "*" to indicate all entity sets/service
            // operations, but that option should NOT be used in production systems)

            // Example for entity sets (this example uses "AllRead" which allows reads but not writes)
        	config.UseVerboseErrors = true;
			config.SetEntitySetAccessRule( "*", EntitySetRights.All );

            // Example for service operations
            // config.SetServiceOperationAccessRule( "*", ServiceOperationRights.All );
        }


        // Query interceptors, change interceptors and service operations go here
    }
}
